@import "./mixin.scss";

.x6-node-selected {
  .ruleChain-node, .ruleCube-node {
    box-shadow: 0 0 0 2px #30323e;
    .node-btn {
      background: #27282e;
      width: 22px;
      height: 22px;
    }
  }
}

.x6-edge-selected {
  .edge-remove{
    display: block;
  }
}

.ruleChain-node {
  .node-main{
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    height: 100%;
  }
  width: 100%;
  height: 100%;
  padding: 8px 16px 8px 16px;
  border-radius: 2px;
  background: #4090f3;
  box-shadow: 0 4px 20px 0 rgba(0 ,0,0,.12);
  user-select: none;
  .left-area {
    width: 144px;
    .title {
      width: 100%;
      margin-bottom: 4px;
      font-weight: bold;
      font-size: 14px;
      color: #fff;
      overflow:hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    .sub-title {
      width: 100%;
      line-height: 20px;
      font-size: 12px;
      color: rgba(255,255,255,.7);
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
  }
  .node-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    .icon {
      margin-left: 5px;
      margin-top: 5px;
    }
  }
  .nodebtn-main {
    float: right;
    margin-top: -74px;
    margin-right: -16px;
  }
  .node-btn {
    overflow: hidden;
    display: block;
    // position: absolute;
    float: right;
    height: 1px;
    width: 1px;
    margin-left: 4px;
    line-height: 22px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    cursor: pointer;

    &.btn-remove {
      right: 0
    }
  }

  @include node-color();
}

.ruleCube-node{
  .node-main{
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    height: 100%;
  }
  width: 100%;
  height: 100%;
  background-color: #f6f7f8;
  border-radius: 4px;
  box-shadow: 0 4px 20px 0 rgba(0 ,0,0,.12);
  .node-icon{
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background-color: #666;
    .icon {
      margin-left: 5px;
      margin-top: 5px;
      color: #FFF;
    }
  }
  .nodebtn-main {
    float: right;
    margin-top: -82px;
    margin-right: -2px;
  }
  .node-btn {
    overflow: hidden;
    display: block;
    // position: absolute;
    margin-left: 4px;
    float: right;
    height: 1px;
    width: 1px;
    line-height: 22px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    cursor: pointer;

    &.btn-remove {
      right: 0
    }
  }
}

.node-tools {
  position: relative;
  padding: 0 10px;
  z-index: 100;
  cursor: pointer;
  &.top {
    width: 18px;
    height: 18px;
    color: #27282e;
    font-size: 16px;
  }
}

.node-port {
  // display: block;
  width: 6px;
  height: 6px;
  margin: 2px 0 0 2px;
  border-radius: 50%;
  border: 3px solid #30323e;
  background: #fff;
  box-shadow: 0 0 0 2px #fff;
  box-sizing: content-box;
}

.edge-remove {
  display: none;
  width: 14px;
  height: 14px;
  float: right;
  margin-right: -16px;
  margin-top: -8px;
  line-height: 12px;
  background: #27282e;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  color: #fff;
  cursor: pointer;
  &::before {
    width: 14px;
    height: 14px;
    zoom: 0.8;
  }
}

.node-label-container{
  text-align: center;
  width: 80px;
  overflow: hidden;
}
.node-label {
  // position: relative;
  display: inline-block;
  margin-left: -8px;
  height: 20px;
  line-height: 20px;
  padding: 0 8px;
  margin-top: 7px;
  background: #fff;
  border: 1px solid #ccc;
  color: #666;
  font-size: 12px;
  max-width: 73px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dropdown-area {
  margin: 0 8px;
  & > span {
    cursor: pointer;
    color: $--color-primary;
  }
}

.node-directions{
  .directions-cnt{
    margin-top: 12px;
    line-height: 20px;
  }
}

.el-scroll-custom-class {
  overflow-x: hidden;
  scrollbar-width: none;
  margin: 0 !important;
}

.singal-value-radio-item,.service-value-radio-item{
  display: block;
  margin-top: 10px;
  margin-bottom: 2px;
}